package com.gouqi.lpl.controller;

import com.gouqi.lpl.domain.Hero;
import com.gouqi.lpl.service.HeroService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/hero")
public class HeroController {

    @Resource
    private HeroService heroService;

    @GetMapping("/get")
    public List<Hero> getHero() {
        List<Hero> heroList = heroService.getHero();
        return heroList;
    }

}
